import request from '@/utils/request'

export default {
  listAll() {
    return request({
      url: '/userTraining/all',
      method: 'get'
    })
  },
  listPage(currentPage, pageSize, QueryUserTrainingDTO) {
    return request({
      url: `/userTraining/search/${currentPage}/${pageSize}`,
      method: 'post',
      data: QueryUserTrainingDTO
    })
  },
  deleteUserTraining(ids) {
    return request({
      url: `/userTraining/delete`,
      method: 'delete',
      data: ids
    })
  },
  save(UserTraining) {
    return request({
      url: `/userTraining/save`,
      method: 'post',
      data: UserTraining
    })
  },
  update(UserTraining) {
    return request({
      url: `/userTraining/update`,
      method: 'post',
      data: UserTraining
    })
  },
  selectUserTrainingById(id) {
    return request({
      url: `/userTraining/${id}`,
      method: 'get'
    })
  }
}
